package com.nave.segundaguerra.servidorecliente.util;

import android.graphics.Bitmap;
import android.graphics.BitmapFactory;

import com.example.honraepodercliente.R;

public class BitmapStorage {
	
	// Declare the Bitmaps
	private Bitmap cenario;
	
	//Interface General
	private Bitmap aviao;
	private Bitmap caixote;
	private Bitmap bandeira;
	private Bitmap pointMobility;
	private Bitmap lupa;
	
	// Interface
	private Bitmap balaQuant;
	// Medico
	private Bitmap medico;
	private Bitmap health;
	// Soldado
	private Bitmap soldado;
	// Objects
	private Bitmap tiro;
	private Bitmap caixa;
	
	private static BitmapStorage instance;
	public static BitmapStorage getInstance()
	{
		if(instance == null)
		{
			instance = new BitmapStorage();
		}
		
		return instance;
	}
	private BitmapStorage()
	{	
		// instantiate the bitmaps
		this.cenario = BitmapFactory.decodeResource(ActivityUtil.getResources(), R.drawable.cenario1);
		
		//Interface General
		this.aviao = BitmapFactory.decodeResource(ActivityUtil.getResources(), R.drawable.lieutenant_attack);
		this.caixote = BitmapFactory.decodeResource(ActivityUtil.getResources(), R.drawable.lieutenant_box);
		this.bandeira = BitmapFactory.decodeResource(ActivityUtil.getResources(), R.drawable.lieutenant_flag);
		this.pointMobility = BitmapFactory.decodeResource(ActivityUtil.getResources(), R.drawable.lieutenant_mobility);
		this.lupa = BitmapFactory.decodeResource(ActivityUtil.getResources(), R.drawable.magnifyingglass);
		
		// Interface
		this.balaQuant = BitmapFactory.decodeResource(ActivityUtil.getResources(), R.drawable.ammo_counter);
		
		//Medico
		this.medico = BitmapFactory.decodeResource(ActivityUtil.getResources(), R.drawable.doctor01);
		this.health = BitmapFactory.decodeResource(ActivityUtil.getResources(), R.drawable.heal06);
		
		// Soldado
		this.soldado = BitmapFactory.decodeResource(ActivityUtil.getResources(), R.drawable.assault01);
		
		// Objects
		this.tiro = BitmapFactory.decodeResource(ActivityUtil.getResources(), R.drawable.gunfire03);
		this.caixa = BitmapFactory.decodeResource(ActivityUtil.getResources(), R.drawable.box_standard);
	}
	

	// CREATE BITMAP
	private void CreateBitmap(Bitmap bitmap, int source)
	{
		bitmap = BitmapFactory.decodeResource(ActivityUtil.getResources(), source);
	}
	
	// GETTERS AND SETTERS
	public Bitmap getCenario() {
		return cenario;
	}
	public void setCenario(Bitmap cenario) {
		this.cenario = cenario;
	}
	
	// Get Interface General
	public Bitmap getAviao(){
		return this.aviao;
	}
	public Bitmap getCaixote(){
		return this.caixote;	
	}
	public Bitmap getBandeira(){
		return this.bandeira;
	}
	public Bitmap getPointMobility(){
		return this.pointMobility;
	}
	public Bitmap getLupa(){
		return this.lupa;
	}
	
	// Get Interface Medico e Soldado
	public Bitmap getMunicao(){
		return this.balaQuant;
	}
	
	// Get Interface Medico
	public Bitmap getMedico(){
		return this.medico;
	}
	public Bitmap getHealth(){
		return this.health;
	}
	// Get Interface Soldado
	public Bitmap getSoldado(){
		return this.soldado;
	}
	// Get Objects
	public Bitmap getTiro(){
		return this.tiro;
	}
	public Bitmap getCaixa(){
		return this.caixa;
	}
}
